package test;

public class Student{
	public int code; 
	public String name; 
	public char sex;
	public Teacher name1;
	public Course site;
	public Student(int code,String name,char sex, Teacher t,Course c){
	this.name1 = t ;
	     this.site=c;
	 } 
    public int getCode(){ 
	     return code; 
	    } 
	    public String getName(){ 
	     return name; 
	    } 
	    public char getSex(){ 
	     return sex; 
	    } 
	    public void setCode(int code){ 
	     this.code = code; 
	    } 
	    public void setName(String name){ 
	     this.name = name; 
	    } 
	    public void setSex(char sex){ 
	     this.sex = sex; 
	    } 
public String toString(){
	  return"学生编号:"+getCode()+"学生姓名:"+getName()+"性别:"+getSex()+"授课老师："+name.name1+this.site; 
	 } 
} 